<?php
// Inialize session
session_start();

// Check, if user is already login, then jump to secured page
if (isset($_SESSION['admin'])) {
header('Location: admin.php');
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

		<title>Art Vision - Login</title>
		<link rel="stylesheet" type="text/css" href="css/view.css" media="all">
		<script type="text/javascript" src="js/view.js"></script>
		<script type="text/javascript" src="js/login.js"></script>
		<script type="text/javascript" src="js/jquery-1.6.1.min.js"></script>
		<script type="text/javascript" src="js/jquery-ui-1.8.min.js"></script>
		
	</head>

	<body>
		<!--Formulario de configuración-->
		<img id="topL" src="img/top.png" alt="">
		<div id="form_containerL">
			<h1>
			Formulario
			</h1>
			<form action="loginProc.php" class="appnitro" method="post" onSubmit="return validarLogin(this)" enctype="multipart/form-data">
			<div class="form_description">
				<h2>Login</h2>
				<p>Administrador</p>
			</div>
			<ul>
					<li style="width: 94%">
						<label class="description" for="user">Nombre de usuario</label>
						<div>
							<input id="user" name="user" class="element text" size="50" type="text" maxlength="30" value=""/> 
						</div>

					</li>
					<li style="width: 94%">
						<label class="description" for="pass">Contrase&ntilde;a</label>
						<div>
							<input id="pass" name="pass" class="element text" size="50" type="password" maxlength="30" value=""/> 
						</div>

					</li>
					<li>
				</ul>
			<ul>
				<li class="buttons liLogin">
					<input id="enviar" class="button_text" type="submit" name="submit" value="Enviar datos" />
				</li>
			</ul>
				<?php
				if (isset($_GET['error']))
				{
					echo "<div class=\"isa_error\">Nombre de usuario y/o contrase&ntilde;a incorrecto/s</div>";
				}?>
				
				<div id="mensaje" class="isa_error" style="display:none" id="conf_error"></div>
			</form>
		</div>
		<img id="bottomL" src="img/bottom.png" alt="">
		
	</body>
</html>